package game;

import java.util.Arrays;
import java.util.List;

/**
 * @author Anirban Laha
 * 
 * This is an object which combines the essential parameters of a strategic form game
 * namely number of players, their strategies/actions and the payoffs for every action
 */
public class StrategicGame {

    private int numPlayers;
    
    private int[] actions;
    
    private List<Double>[] payoffMatrix;
    
    /**
     * 
     * @param numPlayers
     * @param actions
     * @param payoffMatrix
     * 
     * Constructor for Strategic game object
     */
    public StrategicGame(final int numPlayers, final int[] actions, final List<Double>[] payoffMatrix) {
        this.numPlayers = numPlayers;
        this.actions = actions;
        this.payoffMatrix = payoffMatrix;
    }

    /**
     * @return the numPlayers
     */
    public int getNumPlayers() {
        return numPlayers;
    }

    /**
     * @return the actions
     */
    public int[] getActions() {
        return actions;
    }

    /**
     * @return the payoffMatrix
     */
    public List<Double>[] getPayoffMatrix() {
        return payoffMatrix;
    }

    /**
     * Generates the printable string format for the Strategic game object
     */
    @Override
    public String toString() {
        return "StrategicGame [Players:" + numPlayers + ", Actions:"
                + Arrays.toString(actions) + ", PayoffMatrix="
                + Arrays.toString(payoffMatrix) + "]";
    }
    
}
